	<template>
	<div class="numSty">	 
	<div class="mui-numbox" data-numbox-min='0'>
					<button class="mui-btn mui-btn-numbox-minus" type="button">-</button>
					<input id="test" :value="initCount"  class="mui-input-numbox" type="number" ref="numBox" @change="countChange"/>
					<button class="mui-btn mui-btn-numbox-plus" type="button">+</button>
				</div>
	 
	</div>
	</template>


	<script>
	import mui from "../../../lib/mui/js/mui.js"
	import {mapState,mapMutations,mapGetters} from 'vuex'
	export default{	
	  data(){
	    return{
	      pageIndex:1,
	      userComment:''

	    }
	  },
	  props:["initCount","id"],
	  watch:{

	  },
	  mounted(){
	  	mui('.mui-numbox').numbox();

	  },
	  created(){

	  },
	  methods:{	     
	   countChange(){
	   	const val=this.$refs.numBox.value
	   	this.updateShopcartCount({
	   	 id:this.id,
	   	 count:parseInt(val)
	   	})
	   /*	const a=mui('.mui-numbox').numbox().getValue()
	   	console.log('numBox',val,a)
	   	this.$emit('getNumber',parseInt(val))*/
	   },
	   ...mapMutations(["updateShopcartCount"])
	 }
	}
	</script>

	<style lang="less" scoped>
	.numSty{
		
		
		
	}

	</style>	
